<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var str="513030199810066717";
			
//			str=str.replace(/(\d{6})(\d{4})(\d{2})(\d{2})(\d{4})/,function(a,b,c,d,e,f){
//				return c+"年"+d+"月"+e+"日";
//			})

			str=str.replace(/\d{6}(\d{4})(\d{2})(\d{2})\d{4}/,$1"年"$2"月"$3"日");
			
			console.log(str);
		</script>
	</body>
</html>
